function rest = checkhandvelocity(curr,prev,jitter)
%Function checks if hand is moving at current instant
% Returns 1 if Hand is moving
% Returns 0 if Hand is at rest (below the jitter threshold)
% Current, Previous indicate the GLOVE signals of the current and previous
% sample

diff = curr-prev;

diffnorm = norm(diff);
if(diffnorm < jitter)
    rest = 0;
else
    rest = 1;
end
